home *** CD-ROM | disk | FTP | other *** search
- #include <Types.h>
- #include <Dialogs.h>
- #include <StandardFile.h>
- #include <TextUtils.h>
-
- #include "fileMenuRoutines.h"
- #include "WindowExtensions.h"
-
- /* Temporary defines */
-
- #define rAlertStringsID 129
- #define kOpenFileString 1
- #define kPrintFileString 2
-
- /* Private prototypes */
-
- void AlertUser(short alertStringID, Str255 fileName);
-
- void AlertUser(short alertStringID, Str255 fileName)
- {
- short alrtItem;
- Str255 errString;
-
- GetIndString(&errString, rAlertStringsID, alertStringID);
- ParamText(errString, fileName, nil, nil);
- alrtItem = Alert(129, nil);
- }
-
- void GetFileToOpen()
-
- /* Have user choose a file to open from StandardGetFile */
-
- {
- StandardFileReply fileInfo;
- SFTypeList typesToShow;
-
- typesToShow[0] = '****';
-
- DeactivateFloatersAndFirstDocumentWindow();
- StandardGetFile(nil, -1, typesToShow, &fileInfo);
-
- if (fileInfo.sfGood)
- DoOpenFile(&(fileInfo.sfFile));
-
- ActivateFloatersAndFirstDocumentWindow();
- }
-
- void DoOpenFile(FSSpec *fileToOpen)
-
- {
- AlertUser(kOpenFileString, fileToOpen->name);
- }
-
- void DoPrint()
-
- {
- }
-
- void DoPrintFile(FSSpec *fileToPrint)
-
- {
- AlertUser(kPrintFileString, fileToPrint->name);
- }
-
-